//
//  RootViewController.swift
//  WeiboClassSix
//
//  Created by HM on 16/9/30.
//  Copyright © 2016年 HM. All rights reserved.
//

import UIKit

class RootViewController: UIViewController {

    //懒加载属性,只会创建一次
    var visitorView: VisitorView?

    override func viewDidLoad() {
        super.viewDidLoad()
        
        view.backgroundColor = UIColor.white
        setupUI()
    }


}

extension RootViewController {
    
    func setupUI () {
        setupVisitorView()
    }
    
    func setupVisitorView () {
        if visitorView == nil {
            visitorView = VisitorView ()
            view.addSubview(visitorView!)
        }
    }
    
}
